package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {

    //1.sku基本信息获取
    SkuInfoEntity info;


    //2.sku图片信息
    List<SkuImagesEntity> images;

    //3.获取spu的销售属性组合
    List<SkuItemSaleAttrVo> saleAttrVos ;


    //4.获取spu的介绍
    SpuInfoDescEntity desp;


    //5.获取spu的规格参数信息

    List<SpuItemBaseAttrGroup> groupAttrs;

    //是否有库存
    boolean hasStock = true;

    @Data
    public static class SkuItemSaleAttrVo{

        /**
         * 属性id
         */
        @TableId
        private Long attrId;

        private String attrName;

        private List<AttrValueWithSkuIdVo>  attrValues;


    }
    @Data
    public static class SpuItemBaseAttrGroup{

        private String groupName;

        private List<SpuBaseAttrVo> attrs;

    }

    @Data
    public static class SpuBaseAttrVo{


        private String attrName;

        private String attrValue;
    }

}
